package com.heima.domain.query;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class PageQuery {
    @Schema(description = "当前页码")
    private Integer pageNum = 1;
    @Schema(description = "每页数量")
    private Integer pageSize = 10;
    @Schema(description = "排序字段")
    private String sortBy = "update_time";
    @Schema(description = "排序方式")
    private Boolean isAsc = false;
    @Schema(description = "开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime beginTime;
    @Schema(description = "结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime endTime;
}
